#LinuxServer #Network
- We install
sudo apt install libapache2-mod-phpto the server - We go the www.formation.lan in the client web browser
- We will see Apache2 page
- Then we copy the html files to the
sudo cp * /var/www/html/and we renew the page on the web browser - ![[Pasted image 20240327161057.png]]
We go to the pfsense and add a new NAT rule, HTTP to HTTP ![[Pasted image 20240327161513.png]] when we do this and go to the WAN address of the pfsense/router on the browser and we see the same contents on the real machine as well.
172.16.254.129
![[Pasted image 20240327161725.png]]
That's crazy!
To install HTTPS
Install these 2 by copying:
a2enmod ssl
a2ensite default-ssl
restart apache2 if needed.
- and to connect from the real machine, we add the HTTPS rule in pfSense like we did with HTTP:
![[Pasted image 20240327162520.png]]
https hides the codes, passwords etc.
For fun :
Installing Prestashop to our domain:
fetch the prestashop code from sbeteta42's github page.
follow the codes on the github repository
restart the apache service with systemctl restart apache2 (always after making a change!!)
voila. we installed the prestashop on the www.formation.lan through apache2 by adding the codes on the server's terminal.
![[Pasted image 20240327164300.png]]
after opening the website on the client's localhost, we can open it on our real machine, too.
but we need to add the DNS to the hosts file like as a line in the end of the page;
172.16.254.129 www.formation.lan